import numpy as np

import easydict

cfg = easydict.EasyDict()

# NET WORK CONFIG
# input and output size
############################
cfg.multi_scale_inp_size = [np.array([320, 320], dtype=np.int),
                            np.array([352, 352], dtype=np.int),
                            np.array([384, 384], dtype=np.int),
                            np.array([416, 416], dtype=np.int),
                            np.array([448, 448], dtype=np.int),
                            np.array([480, 480], dtype=np.int),
                            np.array([512, 512], dtype=np.int),
                            np.array([544, 544], dtype=np.int),
                            np.array([576, 576], dtype=np.int),
                            # np.array([608, 608], dtype=np.int),
                           ] # w, h

cfg.multi_scale_out_size = [cfg.multi_scale_inp_size[0] / 32,
                            cfg.multi_scale_inp_size[1] / 32,
                            cfg.multi_scale_inp_size[2] / 32,
                            cfg.multi_scale_inp_size[3] / 32,
                            cfg.multi_scale_inp_size[4] / 32,
                            cfg.multi_scale_inp_size[5] / 32,
                            cfg.multi_scale_inp_size[6] / 32,
                            cfg.multi_scale_inp_size[7] / 32,
                            cfg.multi_scale_inp_size[8] / 32,
                            # multi_scale_inp_size[9] / 32,
                            ]   # w, h

cfg.inp_size = np.array([416, 416], dtype=np.int)   # w, h
cfg.out_size = cfg.inp_size / 32 # 13*13



# DATA SET CONFIG

cfg.num_classes = 2
cfg.anchors = np.asarray([(1.08, 1.19), (3.42, 4.41),
                      (6.63, 11.38), (9.42, 5.11), (16.62, 10.52)],
                     dtype=np.float)
cfg.num_anchors = len(cfg.anchors)
cfg.colors=(255,255,255)
cfg.label_names = ['background','tongue']


# for training yolo2
cfg.object_scale = 5.
cfg.noobject_scale = 1.
cfg.class_scale = 1.
cfg.coord_scale = 1.
cfg.iou_thresh = 0.6

